# Maintainer:
pkgname=gr-funcube
# the releases are 'prerelease' but these are the releases
pkgver=3.10.0_rc3
_pkgver=${pkgver/_/.}
pkgrel=8
pkgdesc="Module for gnuradio for a funcube dongle"
url="https://github.com/dl1ksv/gr-funcube"
# same as gr-osmosdr
arch="aarch64 armv7 x86_64"
license="GPL-3.0-or-later"
makedepends="
	cmake
	fmt-dev
	gnuradio-dev
	hidapi-dev
	libusb-dev
	py3-pybind11-dev
	py3-six
	python3-dev
	samurai
	"
subpackages="$pkgname-dev"
source="https://github.com/dl1ksv/gr-funcube/archive/refs/tags/v$_pkgver.tar.gz"
builddir="$srcdir/gr-funcube-$_pkgver"
options="!check" # no tests

build() {
	CFLAGS="$CFLAGS -O2 -DNDEBUG" \
		CXXFLAGS="$CXXFLAGS -O2 -DNDEBUG" \
		cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_SKIP_INSTALL_RPATH=ON
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
851006850975e2de7ccdfb894a02f0b74c03b57c85c0be5c20f3a674e5dcf9b847ddb0d5ffc287c0cd3204aa6daa18355485c7907e1444bb08a344eaa11d8b34  v3.10.0.rc3.tar.gz
"
